import request from "@/utils/request";

// 用户列表
export function getUserList(params) {
    return request({
        url: "/user/userList",
        method: "get",
        params
    })
}

// 根据id删除对应用户
export function deleteById(id) {
    return request({
        url: `/user/delete/${id}`,
        method: "delete",
        id
    })
}

// 新增用户
export function addUser(data) {
    return request({
        url: "/user/add",
        method: "post",
        data
    })
}

// 根据 name、sex 查询用户
export function search(params) {
    return request({
        url: "/user/search",
        method: "get",
        params
    })
}
